An information handling system (IHS) may include multiple processors for processing, handling, communicating or otherwise manipulating information. Each processor may itself include multiple processor cores that work together to process information. A processor or processor core may include processor functional units such as a stack pointer, a program counter, a fetch and decode unit, an issue and execute unit, register files, and other processor units. The processor units function cooperatively with processor system software to form a processor system. Processor system software may include a high level operating system (OS) or other software that manages the processor functional units within the processor system. Application software typically contains a series of software instructions that run under the operating system software in the processor system. Application software may reside in system memory until the operating system software instructs the processor system to read and execute the application software instructions. Application software may contain an applet program or multiple smaller applet programs that run within the control of the software application software. An applet program is a series of applet instructions or instruction text that runs in a small executable module. The Java programming language is a language that many software professionals commonly associate with applets. (Java is a trademark of Sun Microsystems, Inc.) Applets are small pieces of executable code that need a full software application program to contain or manage them. An applet runs inside of the application in a virtual machine. A virtual machine is a set of processor system resources and instructions that form an environment in which applets may execute. Applets typically must run cooperatively with each other in a multitasking environment. Thus, a software application program may contain multiple applet programs that run together in a cooperatively multitasking fashion. The software application program along with the operating system software and processor hardware must manage applet states to avoid conflicts. For example, applet states include applet hardware register file values, applet program counter data, applet memory data values, and other applet program data.
A multitasking environment, namely multiple program applications and therefore multiple applets running concurrently, requires careful management of the applet states during transition from execution of one applet program to another. Typically, when an applet program deactivates or temporarily suspends operation, OS software saves the applet state information in system memory and local hardware register files. Consequently, the OS software can recover or restore the applet state information from memory at a later time and reactivate the previous applet program for operation within the processor system. Multiple applet programs may run concurrently in this fashion by deactivating and reactivating under OS software control and thus may use the hardware of only one processor system. An applet switch is a mechanism that deactivates one applet program and activates another applet program within the resources of the same processor system. Applet switching consumes system memory and other processor system resources. This resource consumption occurs because the OS software manages applet programs state values and consequently the overhead of the processor system increases. Improper applet state management may cause the processor system to function abnormally and result in processor system software lockups, system memory degradation or other negative processor system state effects.
The operating system software may divide the processor system resources such as system memory, hardware registers and other processor system resources into applet divisions to eliminate any overlap between applets during applet switching in a multitasking environment. It is also possible to divide the register file locations into discrete applet divisions or partitions to support more than one applet set of data values. In this case, the register file applet data values for the applet state do not need to read or write from system memory during each applet switch. However, since register files have a limited number of file locations, duplication of similar or identical applet programs to be able to run concurrently is an inefficient method for managing multiple applets. Applet programs contain a series of applet instruction text or code sequences that define processor operation. A common function or instruction text of an applet program is a read or write to hardware register files within the processor system. Register addresses are typically immediate values, namely real values or address pointers. Since the register addresses are immediate values, the applet instruction text must directly address the register file location.
In the case where multiple applets execute identical instruction text, the management of register file addressing becomes a critical issue. Since deactivating and activating applet programs requires significant overhead in processor system resources, another method to manage identical program applets is needed. One approach to managing identical applet programs without the risk of overwriting register files locations involves partitioning the register file for use by each applet program uniquely. Each identical applet program may have a duplicate copy of itself in memory. Programmers or compiler software rewrites each duplicate copy of the applet to modify the register file addresses to address a unique partition area that the OS software assigns to that specific applet. For example, a processor system that utilizes a register file partition to execute 8 common applets may need 8 copies of the same program instruction text. Moreover, register file addresses must typically be chosen in advance to represent the eight different register file partition areas. This method requires the duplication of applet programs, the re-writing of register files addresses, and ultimately consumes precious memory resources.
What is needed is a method and apparatus that addresses the problems associated with managing multiple applets in a multitasking environment in processor systems as described above.